# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=joker
pkgver=1.3.4
pkgrel=0
pkgdesc="Small Clojure interpreter, linter and formatter written in Go"
url="https://joker-lang.org/"
# armhf, armv7, x86: tests fail
arch="all !armhf !armv7 !x86"
license="EPL-1.0"
makedepends="go"
checkdepends="bash"
source="https://github.com/candid82/joker/archive/v$pkgver/joker-$pkgver.tar.gz"

export GOFLAGS="$GOFLAGS -modcacherw"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
export CGO_ENABLED=0

build() {
	go generate -v ./...
	go vet -v ./...
	go build -v
}

check() {
	./all-tests.sh
}

package() {
	install -Dm755 joker -t "$pkgdir"/usr/bin
}

sha512sums="
df4b24cc4dd27282d4202491c810955aef661be97c977cd4d6da90db46ac9221a114007426f3eaf260f79193210254f373d7b730c7fe6a1818b8b8d4b2e84f39  joker-1.3.4.tar.gz
"
